package com.gusha.model;

import java.io.Serializable;
import java.math.BigInteger;
import java.util.Date;
import javax.persistence.*;
import org.hibernate.annotations.DynamicInsert;
import org.hibernate.annotations.NotFound;
import org.hibernate.annotations.NotFoundAction;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;


/**
 * @Created：2018-11-06 14:11:32
 * @Author LightSound的代码生成器
 * @Description:User实体类
 */
/**
 * @author Administrator
 *
 */
/**
 * @author Administrator
 *
 */
@Entity
@Table(name="user")
@NamedQuery(name="User.findAll", query="SELECT u FROM User u")
@DynamicInsert
@Data
@NoArgsConstructor
@AllArgsConstructor
public class User implements Serializable {

    private static final long serialVersionUID = 1L;
    
    @Id
    @GeneratedValue(strategy=GenerationType.IDENTITY)    
    private BigInteger id;
    
    //用户类别 1农户  2代理商  3业务员  4营业部  5代理商业务员 0 APP注册用户
    @Column(name="user_type")
    private Integer userType;
    
    //所属代理商ID
    @Column(name="belong_id")
    private BigInteger belongId;
    
    //用户名，营业部名称
    @Column(name="user_name")
    private String userName;
    
    //密码
    @Column(name="password")
    private String password;
    
    //用户编号
    @Column(name="user_no")
    private String userNo;
    
    //真实姓名，营业部负责人
    @Column(name="real_name")
    private String realName;
    
    //身份证号
    @Column(name="card_no")
    private String cardNo;
    
    //手机号
    @Column(name="phone")
    private String phone;
    
    //家庭住址
    @Column(name="address")
    private String address;
    
    //所属省
    @ManyToOne(fetch=FetchType.LAZY)
   	@NotFound(action=NotFoundAction.IGNORE)
   	@JoinColumn(name="area_province")
    private SysArea areaProvince;
    
    //所属市
    @ManyToOne(fetch=FetchType.LAZY)
   	@NotFound(action=NotFoundAction.IGNORE)
   	@JoinColumn(name="area_city")
    private SysArea areaCity;
    
    //所属区县
    @ManyToOne(fetch=FetchType.LAZY)
   	@NotFound(action=NotFoundAction.IGNORE)
   	@JoinColumn(name="area_district")
    private SysArea areaDistrict;
    
    //所属镇
    @Column(name="area_sub")
    private String areaSub;
    
    //用户职称，代理级别
    @Column(name="user_level")
    private BigInteger userLevel;
    
    //经度
    @Column(name="lon")
    private String lon;
    
    //维度
    @Column(name="lat")
    private String lat;
    
    //性别
    @Column(name="sex")
    private String sex;
    
    //生日
    @Column(name="birth")
    private Date birth;
    
    //年龄
    @Column(name="age")
    private Integer age;
    
    //户口本号
    @Column(name="reg_no")
    private String regNo;
    
    //户主姓名
    @Column(name="reg_main")
    private String regMain;
    
    //户口本图片
    @Column(name="reg_icon")
    private String regIcon;
    
    //身份证图片
    @Column(name="card_icon")
    private String cardIcon;
    
    //创建时间
    @Temporal(TemporalType.TIMESTAMP)
    @Column(name="create_time")
    private Date createTime;
    
    //更新时间
    @Temporal(TemporalType.TIMESTAMP)
    @Column(name="update_time")
    private Date updateTime;
    
    //创建人
    @Column(name="creator")
    private String creator;
    
    //更新人
    @Column(name="updator")
    private String updator;
    
    //0审核未通过 1审核通过
    @Column(name="is_checked")
    private Integer isChecked;
    
    //审核备注
    @Column(name="check_remark")
    private String checkRemark;
    
    //推介人编号
    @Column(name="tjr_no")
    private String tjrNo;
    
    @Column(name="test_money")
    private BigInteger testMoney;
    

	public BigInteger getTestMoney() {
		return testMoney;
	}

	public void setTestMoney(BigInteger testMoney) {
		this.testMoney = testMoney;
	}

	public BigInteger getId() {
		return id;
	}

	public void setId(BigInteger id) {
		this.id = id;
	}

	public Integer getUserType() {
		return userType;
	}

	public void setUserType(Integer userType) {
		this.userType = userType;
	}

	public BigInteger getBelongId() {
		return belongId;
	}

	public void setBelongId(BigInteger belongId) {
		this.belongId = belongId;
	}

	public String getUserName() {
		return userName;
	}

	public void setUserName(String userName) {
		this.userName = userName;
	}

	public String getPassword() {
		return password;
	}

	public void setPassword(String password) {
		this.password = password;
	}

	public String getUserNo() {
		return userNo;
	}

	public void setUserNo(String userNo) {
		this.userNo = userNo;
	}

	public String getRealName() {
		return realName;
	}

	public void setRealName(String realName) {
		this.realName = realName;
	}

	public String getCardNo() {
		return cardNo;
	}

	public void setCardNo(String cardNo) {
		this.cardNo = cardNo;
	}

	public String getPhone() {
		return phone;
	}

	public void setPhone(String phone) {
		this.phone = phone;
	}

	public String getAddress() {
		return address;
	}

	public void setAddress(String address) {
		this.address = address;
	}

	public SysArea getAreaProvince() {
		return areaProvince;
	}

	public void setAreaProvince(SysArea areaProvince) {
		this.areaProvince = areaProvince;
	}

	public SysArea getAreaCity() {
		return areaCity;
	}

	public void setAreaCity(SysArea areaCity) {
		this.areaCity = areaCity;
	}

	public SysArea getAreaDistrict() {
		return areaDistrict;
	}

	public void setAreaDistrict(SysArea areaDistrict) {
		this.areaDistrict = areaDistrict;
	}

	public String getAreaSub() {
		return areaSub;
	}

	public void setAreaSub(String areaSub) {
		this.areaSub = areaSub;
	}

	public BigInteger getUserLevel() {
		return userLevel;
	}

	public void setUserLevel(BigInteger userLevel) {
		this.userLevel = userLevel;
	}

	public String getLon() {
		return lon;
	}

	public void setLon(String lon) {
		this.lon = lon;
	}

	public String getLat() {
		return lat;
	}

	public void setLat(String lat) {
		this.lat = lat;
	}

	public String getSex() {
		return sex;
	}

	public void setSex(String sex) {
		this.sex = sex;
	}

	public Date getBirth() {
		return birth;
	}

	public void setBirth(Date birth) {
		this.birth = birth;
	}

	public Integer getAge() {
		return age;
	}

	public void setAge(Integer age) {
		this.age = age;
	}

	public String getRegNo() {
		return regNo;
	}

	public void setRegNo(String regNo) {
		this.regNo = regNo;
	}

	public String getRegMain() {
		return regMain;
	}

	public void setRegMain(String regMain) {
		this.regMain = regMain;
	}

	public String getRegIcon() {
		return regIcon;
	}

	public void setRegIcon(String regIcon) {
		this.regIcon = regIcon;
	}

	public String getCardIcon() {
		return cardIcon;
	}

	public void setCardIcon(String cardIcon) {
		this.cardIcon = cardIcon;
	}

	public Date getCreateTime() {
		return createTime;
	}

	public void setCreateTime(Date createTime) {
		this.createTime = createTime;
	}

	public Date getUpdateTime() {
		return updateTime;
	}

	public void setUpdateTime(Date updateTime) {
		this.updateTime = updateTime;
	}

	public String getCreator() {
		return creator;
	}

	public void setCreator(String creator) {
		this.creator = creator;
	}

	public String getUpdator() {
		return updator;
	}

	public void setUpdator(String updator) {
		this.updator = updator;
	}

	public Integer getIsChecked() {
		return isChecked;
	}

	public void setIsChecked(Integer isChecked) {
		this.isChecked = isChecked;
	}

	public String getCheckRemark() {
		return checkRemark;
	}

	public void setCheckRemark(String checkRemark) {
		this.checkRemark = checkRemark;
	}

	public String getTjrNo() {
		return tjrNo;
	}

	public void setTjrNo(String tjrNo) {
		this.tjrNo = tjrNo;
	}

	public static long getSerialversionuid() {
		return serialVersionUID;
	}
    

}
